/**
 * Created by caojun on 2017/7/7.
 */
//判断客户端类型 微信 网页  app
function getSource () {
  var u = navigator.userAgent.toLowerCase();//获取判断用的对象
  var logSource = "PC";
  if (u.match(/MicroMessenger/i) == "micromessenger") {
    logSource = "WEI";
  } else if (u.indexOf('iphone') > -1) {
    //是否在IOS浏览器打开
    logSource = "IOS";
  } else if (u.indexOf('android') > -1 || u.indexOf('linux') > -1) {
    //是否在安卓浏览器打开
    logSource = "ANDROID";
  }
  return logSource;
}

export default getSource;
